<?php
class M_log extends Module {
  public function main() {
    $sql = "SELECT * FROM `posts` WHERE 1 ORDER BY `date` DESC";
    $res = db::q( $sql );

    $tmp = new Template('pan_log');
  
    while ( $r = $res->assoc() ) { 
      $post = publication_construct( $r );
      $tmp->add( 'post',   $post );
    }
    return $tmp;
  }
}
?>